//
//  QBMFImagePickerController.h
//  QBImagePickerControllerDemo
//
//  Created by Michael Fan on 14/11/7.
//  Copyright (c) 2014年 Katsuma Tanaka. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AssetsLibrary/AssetsLibrary.h>

typedef NS_ENUM(NSUInteger, QBImagePickerControllerFilterType) {
    QBImagePickerControllerFilterTypePhotos,
    QBImagePickerControllerFilterTypeVideos
};

UIKIT_EXTERN ALAssetsFilter * ALAssetsFilterFromQBImagePickerControllerFilterType(QBImagePickerControllerFilterType type);

@class QBMFImagePickerController;

@protocol QBMFImagePickerControllerDelegate <NSObject>

@optional
- (void)imagePickerController:(QBMFImagePickerController *)imagePickerController didSelectPhtos:(NSArray *)photos;
- (void)imagePickerControllerDidCancel:(QBMFImagePickerController *)imagePickerController;

@end

@interface QBMFImagePickerController : UINavigationController<UIGestureRecognizerDelegate>

@property (nonatomic, weak) id <QBMFImagePickerControllerDelegate> QBMFDelegate;
@property (nonatomic, strong, readonly) ALAssetsLibrary *assetsLibrary;
@property (nonatomic, copy, readonly) NSArray *assetsGroups;
@property (nonatomic, strong, readwrite) NSMutableArray *selectedAssetURLs;

@property (nonatomic, assign) QBImagePickerControllerFilterType filterType;
@property (nonatomic, assign) NSUInteger maximumNumberOfSelection;

-(void)imagePickerCancel;
-(void)imagePickerFinish:(NSArray *)aryPhotos;

+ (BOOL)isAccessible;

@end
